package HelloSeries.metier;

import java.util.HashMap;
import java.util.Map;


public class Tracker {
	private boolean active;
	private boolean isPrivate;
	private NomTracker nomTracker;
	private String url;
	private String priority;
	private Map <String,String> description;
	
	public Tracker(NomTracker nom, String url, String priority, boolean active, boolean isPrivate) {
		super();
		this.active = active;
		this.nomTracker = nom;
		this.priority = priority;
		this.url = url;
		this.setPrivate(isPrivate);
		this.description = new HashMap<String, String>();
	}

	public NomTracker getNomTracker() {
		return nomTracker;
	}

	public void setNomTracker(NomTracker nom) {
		this.nomTracker = nom;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getPriority() {
		return priority;
	}

	public void setPriority(String priority) {
		this.priority = priority;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public boolean isActive() {
		return active;
	}

	public void setPrivate(boolean isPrivate) {
		this.isPrivate = isPrivate;
	}

	public boolean isPrivate() {
		return isPrivate;
	}
	
	public void addCookieKey(String cle, String valeur){
		description.put(cle,valeur);
	}

	public Map<String, String> getDescription() {
		return description;
	}

    @Override
    public String toString()
    {
        return "[active=" + active + ",isPrivate=" + isPrivate + ",nomTracker=" + nomTracker.getValue() + ",url=" + url
            + ",priority=" + priority + ",description=" + description + "]";
    }
}
